﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsUpdate")]
    public class MsUpdate : BaseEntity
    {
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid UpdateId { get; set; }

        [Column(TypeName = "varchar(255)")]
        public string FilePath { get; set; }

        [Column(TypeName = "int4")]
        public int Version { get; set; }

        [Column(TypeName = "varchar(255)")]
        public string FileName { get; set; }

        [NotMapped]
        public Boolean IsImportFile { get => string.IsNullOrEmpty(FilePath); }
    }
}